<%--
  Created by IntelliJ IDEA.
  Banner: lucas
  Date: 2018/2/1
  Time: 上午9:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../common.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>banner编辑--空调小程序后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/css/public.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/js/ImageResizer/css/cropper.min.css">
    <link rel="stylesheet" href="${ctx}/js/ImageResizer/css/ImgCropping.css">
</head>
<body class="childrenBody">
<form class="layui-form layui-row layui-col-space10">
    <input type="hidden" class="layui-input id" name="id" value="">
    <div class="layui-col-md9 layui-col-xs12">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">游戏名称</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input gameName" lay-verify="required" name="gameName" value=""
                               placeholder="请输入游戏名称">
                    </div>
                </div>
            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">游戏提供商</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input gameProvider" lay-verify="required" name="gameProvider" value=""
                               placeholder="请输入游戏提供商">
                    </div>
                </div>
            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">在玩人数</label>
                    <div class="layui-input-block">
                        <input type="number" class="layui-input gameCount" lay-verify="required" name="gameCount" value=""
                               placeholder="请输入在玩人数">
                    </div>
                </div>
            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">游戏类别</label>
                    <div class="layui-input-block">
                        <select name="cateId" lay-filter="gameCate" id="cateId" lay-verify="required"
                                class="layui-select layui-input" name="gameCate">
                            <option value="">请选择一个游戏类别</option>
                            <c:forEach items="${cateList}" var="cate">
                                <option value="${cate.id}">${cate.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-md9 layui-col-xs7" id="appIdDiv" style="display: none;">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">appId/url地址</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input appId" lay-verify="required" name="appId" value=""
                               placeholder="请输入appId/url地址">
                    </div>
                </div>
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">页面路径</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input pagePath"  name="pagePath" value=""
                               placeholder="请输入页面路径">
                    </div>
                </div>
            </div>
            <div class="layui-col-md9 layui-col-xs7" id="erweimaDiv" style="display: none;">
                <div class="layui-form-item layui-row layui-col-xs12">
                    <label class="layui-form-label">二维码</label>
                    <div class="layui-input-inline">
                        <img alt="banner" name="appId" src="../images/img.png" class="appId" width="200px"
                             height="200px"/>
                    </div>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="uploadCode" style="margin-left:20px;">
                            <i class="layui-icon">&#xe67c;</i>上传
                        </button>
                        <p style="margin-left: 20px;margin-top: 20px;color: red">图片大小：400×400 </p>
                    </div>
                </div>

            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item magt3">
                    <label class="layui-form-label">游戏类型</label>
                    <div class="layui-input-block">
                        <select name="gameType" lay-filter="gameType" id="gameType" lay-verify="required"
                                class="layui-select layui-input">
                            <option value="">请选择一个游戏类型</option>
                            <c:forEach items="${typeList}" var="type">
                                <option value="${type.id}">${type.typeName}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item layui-row layui-col-xs12">
                    <label class="layui-form-label">游戏logo</label>
                    <div class="layui-input-inline">
                        <img type="image" alt="banner" name="gameLogo" src="../images/img.png" class="gameLogo"
                             width="200px"
                             height="200px"/>
                    </div>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="uoloadLogo" style="margin-left:20px;">
                            <i class="layui-icon">&#xe67c;</i>上传
                        </button>
                        <p style="margin-left: 20px;margin-top: 20px;color: red">图片大小：118×118 </p>
                    </div>
                </div>
            </div>

            <div class="layui-col-md9 layui-col-xs7">
                <div class="layui-form-item layui-row layui-col-xs12">
                    <label class="layui-form-label">游戏大图logo</label>
                    <div class="layui-input-inline">
                        <img type="image" alt="banner" name="gameBigLogo" src="../images/img.png" class="gameBigLogo"
                             width="200px"
                             height="200px"/>
                    </div>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="uploadBigLogo" style="margin-left:20px;">
                            <i class="layui-icon">&#xe67c;</i>上传
                        </button>
                        <p style="margin-left: 20px;margin-top: 20px;color: red">图片大小：348×184 </p>
                    </div>
                </div>
            </div>
        </div>



        <!--图片裁剪器的工作页面-->
        <div style="display: none" class="tailoring-container">
            <div class="black-cloth" onClick="closeTailor(this)"></div>
            <div class="tailoring-content"   style="width: 100%;height: 100%;overflow: auto;">
                <div class="tailoring-content-one">
                    <label title="上传图片" for="chooseImg" class="l-btn choose-btn">
                        <input type="file" accept="image/jpg,image/jpeg,image/png" name="file" id="chooseImg" class="hidden" onChange="selectImg(this)">
                        选择图片
                    </label>
                    <div class="close-tailoring"  onclick="closeTailor(this)">×</div>
                </div>
                <div class="tailoring-content-two" style="height: 90%;overflow: hidden" >
                    <div class="tailoring-box-parcel" style="width: 70%;height: 100%;float: left;" >
                        <div id="showImgDiv"  style="width: 100%;height: 100%" >
                            <img id="tailoringImg" style="display: none">
                        </div>
                        <div id="showImgDiv2"  style="width: 100%;height: 100%" >
                            <img id="tailoringImg2" style="display: none">
                        </div>
                    </div>
                    <div class="preview-box-parcel" style="height: 90%;float: right">
                        <p>图片预览：</p>
                        <div class="square previewImg"></div>
                        <div class="circular previewImg"></div>
                    </div>
                </div>
                <div class="tailoring-content-three">
                    <span class="l-btn cropper-reset-btn" style=" cursor: pointer;">复位</span>
                    <span class="l-btn cropper-rotate-btn" style=" cursor: pointer;">旋转</span>
                    <span class="l-btn cropper-scaleX-btn" style=" cursor: pointer;">换向</span>
                    <span class="l-btn sureCut" id="sureCut" style=" cursor: pointer;">确定</span>
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-row layui-col-xs12">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="sub">提交</button>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript" src="${ctx}/layui/layui.js"></script>
<script type="text/javascript" src="${ctx}/js/ImageResizer/js/jquery.min.js"></script>
<script type="text/javascript" src="${ctx}/js/ImageResizer/js/cropper.min.js"></script>
<script type="text/javascript" src="${ctx}/js/info/infoAdd.js"></script>
</body>
</html>
